﻿using JNPF.Basics.Models;
using JNPF.Utils;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace JNPF.Basics.Logic
{
    /// <summary>
    /// 岗位管理
    /// 版 本：V3.0.0
    /// 版 权：引迈信息技术有限公司（https://www.jnpfsoft.com）
    /// 作 者：JNPF开发平台组
    /// 日 期：2017.09.20 
    /// </summary>
    internal interface PositionIService
    {
        /// <summary>
        /// 列表
        /// </summary>
        /// <param name="input">请求参数</param>
        /// <returns></returns>
        Task<PageResult<PositionEntity>> GetList(PageInput input);
        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        Task<List<PositionEntity>> GetList();
        /// <summary>
        /// 列表
        /// </summary>
        /// <param name="userId">用户主键</param>
        /// <returns></returns>
        Task<List<PositionEntity>> GetListByUserId(string userId);
        /// <summary>
        /// 信息
        /// </summary>
        /// <param name="id">主键值</param>
        /// <returns></returns>
        Task<PositionEntity> GetInfo(string id);
        /// <summary>
        /// 验证
        /// </summary>
        /// <param name="condition">条件</param>
        /// <returns></returns>
        Task<bool> IsExist(Expression<Func<PositionEntity, bool>> condition);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        Task Delete(PositionEntity entity);
        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        Task<int> Create(PositionEntity entity);
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        Task<int> Update(PositionEntity entity);
    }
}
